package main;

import model.Model;
import view.BlockPanel;
import view.LemonPanel;
import view.MainFrame;
import controller.Controller;

public class Main {

	private static void createGUI() {
		Model model = new Model();
		Controller controller = new Controller(model);
		MainFrame frame = new MainFrame(controller);
		BlockPanel panelB = new BlockPanel(model);
		LemonPanel panelL = new LemonPanel(model);
		frame.add(panelL);
		panelL.add(panelB);
		model.registerWithModel(panelL);
		model.registerWithModel(panelB);
	}
	public static void main(String[] args) {
		try {
			javax.swing.SwingUtilities.invokeAndWait(new Runnable() {

				@Override
				public void run() {
					createGUI();
				}

			});
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	Model model;

	Controller controller;
}